//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/.
// 

package mesh_switch.simulations;

//
// TODO auto-generated module
//
simple Die
{
    parameters:
        // die的开关
        bool die_enable = default(true);
        // 每个die节点的坐标值，从左至右为x正向，从上至下为y正向
        int x;
        int y;
        // 处理一个bit所消耗的时间，对应的速率是160Gbps
        double die_delay = default(6.25e-12);
        // 队列的长度
        int queue_len = default(1024);
        
        // 统计队列利用率
        @signal[percentage_reg](type="double");
        @statistic[Percent](title="Percent"; source="percentage_reg"; record=vector,stats; interpolationmode=none);
        
    	@display("i=device/switch;bgb=501,406");
	gates:
	    // 四个方向的输出端口
        inout north @loose;
        inout south @loose;
        inout west @loose;
        inout east @loose;
}
